<template>
	<view class="index">
		<view class="header flexc flexjb">
			<view class="title">
				{{PersonalInformation.evaluation}}
			</view>
			<view class="info flexr">
				<image src="../../static/image/tini/avator.png" mode="scaleToFill"></image>
				<view class="flex-1 ml30">
					<view class="name">姓名：{{PersonalInformation.name}}</view>
					<view class="name">电话：{{PersonalInformation.phone}}</view>
				</view>
			</view>
		</view>
		
		<view class="body flexc">
			<image src="../../static/image/tini/introduction.png" @click="goIntro(1)" mode="scaleToFill"></image>
			<image src="../../static/image/tini/personInfo.png" @click="goIntro(2)" mode="scaleToFill"></image>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				PersonalInformation: this.$store.state.PersonalInformation,
				list: [] //年龄等的介绍
			}
		},
		async onLoad() {
			// const res = await this.$api('user', {
			// 	type: 'personal'
			// }); //personal
			// try {
			// 	this.title = res.result.data[0].user;
			// 	this.list = res.result.data[0].list;
			// } catch (e) {
			// 	uni.showModal({
			// 		title: '提示',
			// 		content: '服务器繁忙，请关闭后重试',
			// 		showCancel: false
			// 	})
			// }

		},
		methods: {
			btn(k) {
				switch (k) {
					case 3:
						this.setContent('bao01271');
						break;
					case 4:
						uni.makePhoneCall({
							phoneNumber: '17395046959' //仅为示例
						});
						break;
					case 5:
						this.setContent('z_070297@163.com');
						break;
					default:
						break;
				}
			},
			/* 跳转自我介绍 */
			goIntro(k){
				if(k==1){
					
					uni.navigateTo({
						url: '/pages/selfmy/selfmy'
					})
				}else{
					uni.navigateTo({
						url: '/pages/profile/profile'
					})
				}
			},
			setContent(data) {
				// #ifdef H5
				uni.showToast({
					"title": '不支持此功能'
				})
				// #endif
				uni.setClipboardData({
					data: data,
					success: res => {
						uni.showToast({
							"title": '复制成功'
						})
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		height: 100%;
	}

	.index {
		width: 100%;
		height: 100%;
		overflow: hidden;
		background: url('https://vkceyugu.cdn.bspapp.com/VKCEYUGU-1c70ecd7-b6b9-48c5-a42e-961fa3dcf6d4/ce66638e-0784-4dd9-aa3c-4421261bcc02.png') no-repeat;
		background-size: 100% 100%;
		display: flex;
		align-items: flex-end;
		flex-direction: column;

		.header {
			width: 100%;
			height: 30.6%;
			box-sizing: border-box;
			padding: 40rpx 50rpx;

			.title {
				font-family: PingFangSC-Semibold;
				font-weight: 600;
				font-size: 18px;
				color: #FFFFFF;
				letter-spacing: 1px;
			}

			.info {
				width: 100%;
				height: 60px;

				&>image {
					display: block;
					width: 60px;
					height: 60px;
				}

				.name {
					height: 30px;
					line-height: 30px;
					font-family: PingFangSC-Semibold;
					font-weight: 500;
					font-size: 15px;
					color: #FFFFFF;
				}

				.ml30 {
					margin-left: 30px;
				}
			}

		}

		.body {
			width: 100%;
			height: 66%;
			box-sizing: border-box;
			padding: 20px;

			&>image {
				display: block;
				width: 300px;
				height: 120px;
				margin: 20px auto;
			}
		}

	}
</style>
